package com.ruoyi.web.controller.charge;

import com.ruoyi.charge.service.GtDrugService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("charge/gtDrug")
public class GtDrugController {
    @Autowired
    private GtDrugService gtDrugService;

    @PreAuthorize("@ss.hasPermi('charge:gtDrug:del')")
    @GetMapping("/{drugs}")
    public AjaxResult del(@PathVariable String[] drugs) {
        System.out.println("8888888888888888888888888------------------------------------------------");
        System.out.println("8888888888888888888888888------------------------------------------------");
        System.out.println("8888888888888888888888888------------------------------------------------");
        System.out.println(Arrays.toString(drugs));
        return success(gtDrugService.gt(drugs));
    }
}
